<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>${message("admin.message.edit")}</title>
<meta name="author" content="EVOLUTION Team" />
<meta name="copyright" content="EVOLUTION" />
<link href="${base}/resources/admin/css/common.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${base}/resources/admin/js/jquery.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/jquery.tools.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/jquery.validate.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/jquery.lSelect.js"></script>
<script type="text/javascript" src="${base}/resources/admin/editor/kindeditor.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/common.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/input.js"></script>
<style type="text/css">
.roles label {
	width: 150px;
	display: block;
	float: left;
	padding-right: 6px;
}
</style>
<script type="text/javascript">
$().ready(function() {
	
	[@flash_message /]
	
});
</script>
</head>
<body>
	<div class="path">
		<a href="${base}/admin/common/index.jhtml">${message("admin.path.index")}</a> &raquo; ${message("admin.message.edit")}
	</div>
	<form id="inputForm" action="pageRedirect.jhtml" method="get">
	    <input type="hidden" name="criminalNumber" value="${criminalBase.criminalNumber}" />
	    <input type="hidden" name="caseCriminal" value="${criminalBase.caseCriminal}" />
	    <input type="hidden" name="casePenalty" value="${criminalBase.casePenalty}" />
		<ul id="tab" class="tab">
			<li>
				<input type="button" value="${message("admin.message.tableOne")}" />
			</li>
		</ul>
		<table class="input tabContent" id="tableOne">
		    <tr>
		       <td colspan="8" class="styleTitle">
		          ${message("admin.message.tableOneTitle")}
		       </td>
		    </tr>
		    <!-- The first row -->
			<tr>
				<th>
					${message("admin.message.cardId")}:
				</th>
				<td>
					${criminalBase.idCardNum}
				</td>
				<th>
				    ${message("admin.message.gender")}:
				</th>
				<td>
			       [#list genderGroup as masterConfig ]
			          [#if "${criminalBase.gender}" == "${masterConfig.cd}"]
			             ${masterConfig.decode}
			          [/#if]
			       [/#list]
				</td>
				<th>
				    ${message("admin.message.name")}:
				</th>
				<td>
				    ${criminalBase.name}
				</td>
				<th>
				    ${message("admin.message.alias")}:
				</th>
				<td>
				    ${criminalBase.alias}
				</td>
			</tr>
			<!-- The second row -->
			<tr>
			    <th>
			        ${message("admin.message.arrestAge")}:
			    </th>
			    <td>
			        ${criminalBase.ageOfArreset}
			    </td>
			    <th>
			       ${message("admin.message.marriage")}:
			    </th>
			    <td>
			       [#list marriageGroup as masterConfig ]
                       [#if "${criminalBase.marriage}" == "${masterConfig.cd}" ]
                           ${masterConfig.decode}
                       [/#if]
			       [/#list]	       				       			       
			    </td>
			    <th>
			        ${message("admin.message.profession")}:
			    </th>
			    <td>
			        [#list professionGroup as masterConfig ]
			            [#if "${criminalBase.profession}" == "${masterConfig.cd}" ]
			                ${masterConfig.decode}
			            [/#if]
			        [/#list]		    
			    </td>			    
			    <th>
			        ${message("admin.message.parentDivorce")}:
			    </th>
			    <td>
			       [#list commonHave as masterConfig ]
			          [#if "${criminalBase.parentDivorce}" == "${masterConfig.cd}" ]
			              ${masterConfig.decode}
			          [/#if]
			       [/#list]		       			        
			    </td>
			</tr>
			
			<!-- the third row -->
			<tr>
			   <th>
			       ${message("admin.message.religion")}:
			   </th>
 			   <td>
 			       ${religion.name}
			   </td>
			   <th>
			      ${message("admin.message.ethnic")}:
			   </th>
			   <td>
			      ${ethnic.name}
			   </td>
			   <th>
			        ${message("admin.message.education")}:
			   </th>
			   <td>
			        [#list educationGroup as masterConfig ]
			          [#if "${criminalBase.educationLevel}" == "${masterConfig.cd}" ]
			             ${masterConfig.decode}
			          [/#if]
			        [/#list]			    
			   </td>			   
			   <th>
			      ${message("admin.message.sonOfFarmer")}:
			   </th>
			   <td>
			      [#list commonBool as masterConfig ]
			         [#if "${criminalBase.sonOfFarmer}" == "${masterConfig.cd}" ]
			             ${masterConfig.decode}
			         [/#if]			                
			      [/#list]
			   </td>
			</tr>
			
			<!-- the fourth row -->
			<tr>
			    <th>
			        ${message("admin.message.criminalBefore")}:
			    </th>
			    <td colspan="3">
			           [#list commonHave as masterConfig ]
			             [#if "${criminalBase.criminalBefore}" == "${masterConfig.cd}" ]
			                ${masterConfig.decode}
			             [/#if]   
			           [/#list]
			       </select> 			        
			    </td>
			    <th>
			        ${message("admin.message.contectNumber")}：
			    </th>
			    <td colspan="3">  
			        ${criminalBase.contactNumber}
			    </td>			    
			</tr>
			
			<!-- 5 -->
			<tr>
			    <th>
			       ${message("admin.message.mainIncome")}:
			    </th>
			    <td colspan="7">
			       [#assign mainIncomeTempList = "${criminalBase.mainIncome}"]
			       [#list mainIncomeTempList?split(",") as sValue ]
			          [#list mainIncomeGroup as masterConfig ]
			              [#if sValue == "${masterConfig.cd}"]
			                 [#if sValue_has_next ]
			                    ${masterConfig.decode},
			                 [#else]
			                    ${masterConfig.decode}
			                 [/#if]
			              [/#if]
			          [/#list]
			       [/#list] 		       
			    </td>	
			</tr>			
			
			<!-- 6 -->
			<tr>
			    <th>
			        ${message("admin.message.householdDetailAddress")}:
			    </th>
			    <td colspan="7">
			       [#list areaGroup as area ]
			          [#if area.id == "${criminalBase.householdArea}" ]
			              ${area.fullName}&nbsp;${criminalBase.householdAddress}
			          [/#if]
			       [/#list]
			    </td>
			</tr>
			<!-- 7 -->
			<tr>
			   <th>
			       ${message("admin.message.householdPoliceStationName")}:
			   </th>
			   <td colspan="7">
			       ${criminalBase.householdPoliceStationName}
			   </td>
			</tr>   				
			
			<!-- 8 -->
			<tr>
			    <th>
			        ${message("admin.message.currentDetailAddress")}:
			    </th>
			    <td colspan="7">
			       [#list areaGroup as area ]
			          [#if area.id == "${criminalBase.currentArea}" ]
			              ${area.fullName}&nbsp;${criminalBase.currentAddress}
			          [/#if]
			       [/#list]
			    </td>
			</tr> 
			
			<!-- 9 -->			
			<tr>
			   <th>
			       ${message("admin.message.currentPoliceStationName")}:
			   </th>
			   <td colspan="3">
			       ${criminalBase.currentPoliceStationName}
			   </td>
			</tr>			
			
			<!-- 10 -->
			<tr>
			    <th rowspan="2">
			        ${message("admin.message.caseType")}:
			    </th>
			    <td id="casePenaltyId" colspan="7">
			        ${message("admin.message.casePenalty")}:
			        [#assign casePenaltyTmpList = "${criminalBase.casePenalty}" ]
			        [#list casePenaltyTmpList?split(",") as sValue ]
			           [#list penaltyCategoryGroup as masterConfig ]
			              [#if sValue == "${masterConfig.cd}"]
			                 [#if sValue_has_next ]
			                    ${masterConfig.decode},
			                 [#else]
			                    ${masterConfig.decode}
			                 [/#if]
			              [/#if]
			           [/#list]
			        [/#list]
			    </td>			    
			</tr>
			<tr>
			   <td colspan="7">
			        ${message("admin.message.caseCriminal")}:
			        [#assign caseCriminalTempList = "${criminalBase.caseCriminal}"]
			        [#list caseCriminalTempList?split(",") as sValue ]
			            [#list criminalCategoryGroup as masterConfig ]
			              [#if sValue == "${masterConfig.cd}"]
			                 [#if sValue_has_next ]
			                    ${masterConfig.decode},
			                 [#else]
			                    ${masterConfig.decode}
			                 [/#if]
			              [/#if]
			            [/#list]
			        [/#list]
			   </td>
			</tr>
			
			<!-- the 11 row -->
			<tr>
			    <th rowspan="6">
			        ${message("admin.message.temporaryInfo")}:
			    </th>
			</tr>
			<tr>
			    <th>
			        ${message("admin.message.temporaryChoice")}:
			    </th>
			    <td colspan="6">  
			           [#list commonBool as masterConfig ]
			               [#if "${criminalBase.temporaryGuy}" == "${masterConfig.cd}" ]
			                  ${masterConfig.decode}
			               [/#if] 
			           [/#list]
			       </select>
			    </td>
			 </tr>   
			<tr>
			    <th>
			        ${message("admin.message.temporaryRegist")}:
			    </th>
			    <td colspan="6">
			           [#list commonBool as masterConfig ]
			             [#if "${criminalBase.temporaryRegist}" == "${masterConfig.cd}" ]
			                ${masterConfig.decode}
			             [/#if]
			           [/#list]
			           &nbsp;
			           [#list temporaryNoRegistDuraGroup as masterConfig ]
			              [#if "${criminalBase.temporaryNoRegistDura}" == "${masterConfig.cd}" ]
			                ${masterConfig.decode}
			              [/#if]
			           [/#list]
			       </select>		    
			    </td>
			</tr>
			<tr>
			    <th>
			        ${message("admin.message.temporaryFixAd")}:
			    </th>
			    <td colspan="6">
			           [#list commonBool as masterConfig ]
			              [#if "${criminalBase.temporaryFixAd}" == "${masterConfig.cd}" ]
			                  ${masterConfig.decode}
			              [/#if]			                
			           [/#list]
			       </select>
			    </td>
			</tr>
			<tr>
			    <th>
			        ${message("admin.message.temporaryFixJob")}:
			    </th>
			    <td colspan="6">
			           [#list commonBool as masterConfig ]
			             [#if "${criminalBase.temporaryFixJob}" == "${masterConfig.cd}" ]
			                ${masterConfig.decode}
			             [/#if]
			           [/#list]
			       </select>			        
			    </td>
			</tr>
			<tr>
			    <th>
			        ${message("admin.message.temporaryTransTools")}:
			    </th>
			    <td colspan="6">
			           [#list temporaryTransToolsGroup as masterConfig ]
			             [#if "${criminalBase.temporaryTransTools}" == "${masterConfig.cd}" ]
			                ${masterConfig.decode}
			             [/#if]
			           [/#list]
			       </select>			        
			    </td>
			</tr>				
			
			
			<!-- 12 -->
			<tr>
			    <th rowspan="3">
			        ${message("admin.message.localCriminalDetail")}:
			    </th>
			</tr>
			<tr>
			    <th>
			        ${message("admin.message.localAreaCategory")}:
			    </th>
			    <td colspan="7">
			        [#list localAreaCategoryGroup as masterConfig ]
			          [#if "${criminalBase.localAreaCategory}" == "${masterConfig.cd}" ]
			              ${masterConfig.decode}
			          [/#if]
			        [/#list]
			    </td>
			</tr>
			<tr>
			    <th>
			        ${message("admin.message.localCriminalAddress")}:
			    </th>
			    <td colspan="7">
			       [#list areaGroup as area ]
			          [#if area.id == "${criminalBase.localCriminalArea}" ]
			              ${area.fullName}&nbsp;${criminalBase.localCriminalAddress}
			          [/#if]
			       [/#list]
			    </td>
			</tr>	
			
			<!-- 13 -->
			<tr>
			    <th>
			        ${message("admin.message.beforeArrestDay")}:
			    </th>
			    <td colspan="3">
			           [#list durationStayGroup as masterConfig ]
			              [#if "${criminalBase.beforeArrestDays}" == "${masterConfig.cd}" ]
			                 ${masterConfig.decode}
			              [/#if]
			           [/#list]
			       </select>
			    </td>
			    <th>
			        ${message("admin.message.ciminalMates")}:
			    </th>
			    <td colspan="3">
			       ${criminalBase.ciminalMatesName}
			    </td>			    
			</tr>						
			
			
			<!-- the forteenth row --> 
			<tr>
			    <th>
			        ${message("admin.message.policerDepartment")}:
			    </th>
			    <td colspan="3">
			        ${criminalBase.policerDepartment}
			    </td>
			    			
			    <th>
			        ${message("admin.message.policerName")}:
			    </th>
			     <td colspan="3">
			        ${criminalBase.policerName}
			    </td>
			</tr>								
		</table>
		<table class="input">
			<tr>
				<td style="text-align:center;">
				    <input type="submit" class="button" value="${message("admin.common.nextStep")}" />
					<input type="button" class="button" value="${message("admin.common.back")}" onclick="location.href='list.jhtml'" />
				</td>
			</tr>
		</table>
	</form>
</body>
</html>